//
//  AVStream.hpp
//  VideoParse
//
//  Created by xiaerfei on 2020/4/1.
//  Copyright © 2020 erfeixia. All rights reserved.
//

#ifndef AVStream_hpp
#define AVStream_hpp

#include <stdio.h>
#include "AVCodec.hpp"
#include "rational.hpp"

enum AVStreamParseType {
    AVSTREAM_PARSE_NONE,
    AVSTREAM_PARSE_FULL,       /**< full parsing and repack */
    AVSTREAM_PARSE_HEADERS,    /**< Only parse headers, do not repack. */
    AVSTREAM_PARSE_TIMESTAMPS, /**< full parsing and interpolation of timestamps for frames not starting on a packet boundary */
    AVSTREAM_PARSE_FULL_ONCE,  /**< full parsing and repack of the first frame only, only implemented for H.264 currently */
    AVSTREAM_PARSE_FULL_RAW,   /**< full parsing and repack with timestamp and position generation by parser for raw
                                    this assumes that each packet in the file contains no demuxer level headers and
                                    just codec level data, otherwise position generation would fail */
};

class AVStream {
    
public:
    AVCodecParameters *codecpar;
    
    AVRational avg_frame_rate;///< 平均帧率
  
    enum AVStreamParseType need_parsing;///< av_read_frame() support
    
};


#endif /* AVStream_hpp */
